package cn.wolfcode.crm.query;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Setter
@Getter
@ToString
public class ClientQueryObject extends QueryObject {

    private Integer state;
    private Integer developsgin;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date beginDate;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endingDate;
    private String principalName;
    private String keywords;

    public Integer getState(){
        return state!=null?state:null;
    }
    public Integer getDevelopsgin(){
        return developsgin!=null?state:null;
    }
    public Date getBeginDate(){
        return beginDate!=null&&!"".equals(beginDate)?beginDate:null;
    }
    public Date getEndingDate(){
        return endingDate!=null&&!"".equals(endingDate)?endingDate:null;
    }
    public String getPrincipalName(){
        return principalName!=null&&!"".equals(principalName)?principalName:null;
    }
    public String getKeywords(){
    return keywords!=null&&!"".equals(keywords.trim())?keywords:null;
    }
}
